// Output created by jacc on Sun Nov 30 17:29:49 CET 2014

package it.unicam.fishpass.prism;

import java.util.*;
import java.io.*;

class ExpressionParser implements ExpressionParserTokens {
    private int yyss = 100;
    private int yytok;
    private int yysp = 0;
    private int[] yyst;
    protected int yyerrno = (-1);
    private Object[] yysv;
    private Object yyrv;

    public boolean parse() {
        int yyn = 0;
        yysp = 0;
        yyst = new int[yyss];
        yysv = new Object[yyss];
        yytok = (lexer.token
                 );
    loop:
        for (;;) {
            switch (yyn) {
                case 0:
                    yyst[yysp] = 0;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 77:
                    yyn = yys0();
                    continue;

                case 1:
                    yyst[yysp] = 1;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 78:
                    yyn = yys1();
                    continue;

                case 2:
                    yyst[yysp] = 2;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 79:
                    switch (yytok) {
                        case COMMA:
                            yyn = 20;
                            continue;
                        case SEMI:
                            yyn = yyr11();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 3:
                    yyst[yysp] = 3;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 80:
                    switch (yytok) {
                        case SEMI:
                            yyn = 21;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 4:
                    yyst[yysp] = 4;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 81:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                            yyn = yyr8();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 5:
                    yyst[yysp] = 5;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 82:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                            yyn = yyr6();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 6:
                    yyst[yysp] = 6;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 83:
                    yyn = yys6();
                    continue;

                case 7:
                    yyst[yysp] = 7;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 84:
                    switch (yytok) {
                        case CAPS:
                            yyn = 30;
                            continue;
                        case SEMI:
                            yyn = 31;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 8:
                    yyst[yysp] = 8;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 85:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                        case COMMA:
                            yyn = yyr28();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 9:
                    yyst[yysp] = 9;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 86:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                            yyn = yyr20();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 10:
                    yyst[yysp] = 10;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 87:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                        case COMMA:
                            yyn = yyr18();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 11:
                    yyst[yysp] = 11;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 88:
                    yyn = yys11();
                    continue;

                case 12:
                    yyst[yysp] = 12;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 89:
                    yyn = yys12();
                    continue;

                case 13:
                    yyst[yysp] = 13;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 90:
                    yyn = yys13();
                    continue;

                case 14:
                    yyst[yysp] = 14;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 91:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                            yyn = yyr19();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 15:
                    yyst[yysp] = 15;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 92:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                        case COMMA:
                            yyn = yyr17();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 16:
                    yyst[yysp] = 16;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 93:
                    yyn = yys16();
                    continue;

                case 17:
                    yyst[yysp] = 17;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 94:
                    switch (yytok) {
                        case SEMI:
                            yyn = 48;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 18:
                    yyst[yysp] = 18;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 95:
                    switch (yytok) {
                        case CAPS:
                            yyn = 30;
                            continue;
                        case SEMI:
                            yyn = 49;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 19:
                    yyst[yysp] = 19;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 96:
                    yyn = yys19();
                    continue;

                case 20:
                    yyst[yysp] = 20;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 97:
                    switch (yytok) {
                        case VAR:
                            yyn = 51;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 21:
                    yyst[yysp] = 21;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 98:
                    yyn = yys21();
                    continue;

                case 22:
                    yyst[yysp] = 22;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 99:
                    switch (yytok) {
                        case NUM:
                            yyn = 12;
                            continue;
                        case LBRACK:
                            yyn = 36;
                            continue;
                        case VAR:
                            yyn = 53;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 23:
                    yyst[yysp] = 23;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 100:
                    switch (yytok) {
                        case NUM:
                            yyn = 12;
                            continue;
                        case LBRACK:
                            yyn = 36;
                            continue;
                        case VAR:
                            yyn = 53;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 24:
                    yyst[yysp] = 24;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 101:
                    switch (yytok) {
                        case NUM:
                            yyn = 12;
                            continue;
                        case LBRACK:
                            yyn = 36;
                            continue;
                        case VAR:
                            yyn = 53;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 25:
                    yyst[yysp] = 25;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 102:
                    switch (yytok) {
                        case NUM:
                            yyn = 12;
                            continue;
                        case LBRACK:
                            yyn = 36;
                            continue;
                        case VAR:
                            yyn = 53;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 26:
                    yyst[yysp] = 26;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 103:
                    switch (yytok) {
                        case NUM:
                            yyn = 12;
                            continue;
                        case LBRACK:
                            yyn = 36;
                            continue;
                        case VAR:
                            yyn = 53;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 27:
                    yyst[yysp] = 27;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 104:
                    switch (yytok) {
                        case NUM:
                            yyn = 12;
                            continue;
                        case LBRACK:
                            yyn = 36;
                            continue;
                        case VAR:
                            yyn = 53;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 28:
                    yyst[yysp] = 28;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 105:
                    switch (yytok) {
                        case NUM:
                            yyn = 12;
                            continue;
                        case LBRACK:
                            yyn = 36;
                            continue;
                        case VAR:
                            yyn = 53;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 29:
                    yyst[yysp] = 29;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 106:
                    switch (yytok) {
                        case NUM:
                            yyn = 12;
                            continue;
                        case LBRACK:
                            yyn = 36;
                            continue;
                        case VAR:
                            yyn = 53;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 30:
                    yyst[yysp] = 30;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 107:
                    yyn = yys30();
                    continue;

                case 31:
                    yyst[yysp] = 31;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 108:
                    yyn = yys31();
                    continue;

                case 32:
                    yyst[yysp] = 32;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 109:
                    yyn = yys32();
                    continue;

                case 33:
                    yyst[yysp] = 33;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 110:
                    switch (yytok) {
                        case CAPS:
                            yyn = 30;
                            continue;
                        case RBRACK:
                            yyn = 63;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 34:
                    yyst[yysp] = 34;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 111:
                    yyn = yys34();
                    continue;

                case 35:
                    yyst[yysp] = 35;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 112:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                        case COMMA:
                            yyn = yyr29();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 36:
                    yyst[yysp] = 36;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 113:
                    switch (yytok) {
                        case NUM:
                            yyn = 12;
                            continue;
                        case LBRACK:
                            yyn = 36;
                            continue;
                        case VAR:
                            yyn = 53;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 37:
                    yyst[yysp] = 37;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 114:
                    yyn = yys37();
                    continue;

                case 38:
                    yyst[yysp] = 38;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 115:
                    switch (yytok) {
                        case NUM:
                            yyn = 65;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 39:
                    yyst[yysp] = 39;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 116:
                    yyn = yys39();
                    continue;

                case 40:
                    yyst[yysp] = 40;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 117:
                    yyn = yys40();
                    continue;

                case 41:
                    yyst[yysp] = 41;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 118:
                    yyn = yys41();
                    continue;

                case 42:
                    yyst[yysp] = 42;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 119:
                    switch (yytok) {
                        case NUM:
                            yyn = yyr25();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 43:
                    yyst[yysp] = 43;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 120:
                    switch (yytok) {
                        case NUM:
                            yyn = yyr26();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 44:
                    yyst[yysp] = 44;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 121:
                    switch (yytok) {
                        case NUM:
                            yyn = yyr27();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 45:
                    yyst[yysp] = 45;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 122:
                    switch (yytok) {
                        case NUM:
                            yyn = yyr24();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 46:
                    yyst[yysp] = 46;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 123:
                    switch (yytok) {
                        case NUM:
                            yyn = yyr23();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 47:
                    yyst[yysp] = 47;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 124:
                    switch (yytok) {
                        case VAR:
                            yyn = 70;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 48:
                    yyst[yysp] = 48;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 125:
                    yyn = yys48();
                    continue;

                case 49:
                    yyst[yysp] = 49;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 126:
                    yyn = yys49();
                    continue;

                case 50:
                    yyst[yysp] = 50;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 127:
                    switch (yytok) {
                        case SEMI:
                            yyn = yyr10();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 51:
                    yyst[yysp] = 51;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 128:
                    switch (yytok) {
                        case EQ:
                            yyn = 41;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 52:
                    yyst[yysp] = 52;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 129:
                    yyn = yys52();
                    continue;

                case 53:
                    yyst[yysp] = 53;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 130:
                    switch (yytok) {
                        case AUTODECREMENT:
                            yyn = 39;
                            continue;
                        case AUTOINCREMENT:
                            yyn = 40;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 54:
                    yyst[yysp] = 54;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 131:
                    yyn = yys54();
                    continue;

                case 55:
                    yyst[yysp] = 55;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 132:
                    yyn = yys55();
                    continue;

                case 56:
                    yyst[yysp] = 56;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 133:
                    yyn = yys56();
                    continue;

                case 57:
                    yyst[yysp] = 57;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 134:
                    yyn = yys57();
                    continue;

                case 58:
                    yyst[yysp] = 58;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 135:
                    yyn = yys58();
                    continue;

                case 59:
                    yyst[yysp] = 59;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 136:
                    yyn = yys59();
                    continue;

                case 60:
                    yyst[yysp] = 60;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 137:
                    yyn = yys60();
                    continue;

                case 61:
                    yyst[yysp] = 61;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 138:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                            yyn = yyr7();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 62:
                    yyst[yysp] = 62;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 139:
                    yyn = yys62();
                    continue;

                case 63:
                    yyst[yysp] = 63;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 140:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                            yyn = yyr9();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 64:
                    yyst[yysp] = 64;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 141:
                    yyn = yys64();
                    continue;

                case 65:
                    yyst[yysp] = 65;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 142:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                            yyn = yyr21();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 66:
                    yyst[yysp] = 66;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 143:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                        case COMMA:
                            yyn = yyr15();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 67:
                    yyst[yysp] = 67;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 144:
                    switch (yytok) {
                        case CAPS:
                            yyn = 71;
                            continue;
                        case SEMI:
                        case COMMA:
                            yyn = yyr12();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 68:
                    yyst[yysp] = 68;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 145:
                    yyn = yys68();
                    continue;

                case 69:
                    yyst[yysp] = 69;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 146:
                    yyn = yys69();
                    continue;

                case 70:
                    yyst[yysp] = 70;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 147:
                    switch (yytok) {
                        case EQQ:
                            yyn = 42;
                            continue;
                        case GEQ:
                            yyn = 43;
                            continue;
                        case GR:
                            yyn = 44;
                            continue;
                        case LEQ:
                            yyn = 45;
                            continue;
                        case LS:
                            yyn = 46;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 71:
                    yyst[yysp] = 71;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 148:
                    yyn = yys71();
                    continue;

                case 72:
                    yyst[yysp] = 72;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 149:
                    switch (yytok) {
                        case CAPS:
                            yyn = 71;
                            continue;
                        case RBRACK:
                            yyn = 75;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 73:
                    yyst[yysp] = 73;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 150:
                    switch (yytok) {
                        case NUM:
                            yyn = 76;
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 74:
                    yyst[yysp] = 74;
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 151:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                        case COMMA:
                            yyn = yyr14();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 75:
                    yyst[yysp] = 75;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 152:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                        case COMMA:
                            yyn = yyr16();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 76:
                    yyst[yysp] = 76;
                    yysv[yysp] = (lexer.semanticValue
                                 );
                    yytok = (nextToken()
                            );
                    if (++yysp>=yyst.length) {
                        yyexpand();
                    }
                case 153:
                    switch (yytok) {
                        case CAPS:
                        case SEMI:
                        case RBRACK:
                            yyn = yyr22();
                            continue;
                    }
                    yyn = 157;
                    continue;

                case 154:
                    return true;
                case 155:
                    yyerror("stack overflow");
                case 156:
                    return false;
                case 157:
                    yyerror("syntax error");
                    return false;
            }
        }
    }

    protected void yyexpand() {
        int[] newyyst = new int[2*yyst.length];
        Object[] newyysv = new Object[2*yyst.length];
        for (int i=0; i<yyst.length; i++) {
            newyyst[i] = yyst[i];
            newyysv[i] = yysv[i];
        }
        yyst = newyyst;
        yysv = newyysv;
    }

    private int yys0() {
        switch (yytok) {
            case FALSE:
                return 9;
            case FF:
                return 10;
            case LBRACK:
                return 11;
            case NUM:
                return 12;
            case TILDE:
                return 13;
            case TRUE:
                return 14;
            case TT:
                return 15;
            case VAR:
                return 16;
        }
        return 157;
    }

    private int yys1() {
        switch (yytok) {
            case ENDINPUT:
                return 154;
            case FALSE:
                return 9;
            case FF:
                return 10;
            case LBRACK:
                return 11;
            case NUM:
                return 12;
            case TILDE:
                return 13;
            case TRUE:
                return 14;
            case TT:
                return 15;
            case VAR:
                return 16;
            case SEMI:
                return 19;
        }
        return 157;
    }

    private int yys6() {
        switch (yytok) {
            case DIVIDE:
                return 22;
            case EQQ:
                return 23;
            case LEQ:
                return 24;
            case LS:
                return 25;
            case MINUS:
                return 26;
            case MOD:
                return 27;
            case PLUS:
                return 28;
            case TIMES:
                return 29;
        }
        return 157;
    }

    private int yys11() {
        switch (yytok) {
            case FALSE:
                return 9;
            case FF:
                return 10;
            case LBRACK:
                return 11;
            case NUM:
                return 12;
            case TILDE:
                return 13;
            case TRUE:
                return 14;
            case TT:
                return 15;
            case VAR:
                return 34;
        }
        return 157;
    }

    private int yys12() {
        switch (yytok) {
            case LS:
            case EQQ:
            case LEQ:
            case TIMES:
            case CAPS:
            case SEMI:
            case RBRACK:
            case DIVIDE:
            case PLUS:
            case MOD:
            case MINUS:
            case COMMA:
                return yyr34();
        }
        return 157;
    }

    private int yys13() {
        switch (yytok) {
            case FF:
                return 10;
            case NUM:
                return 12;
            case TILDE:
                return 13;
            case TT:
                return 15;
            case LBRACK:
                return 36;
            case VAR:
                return 37;
        }
        return 157;
    }

    private int yys16() {
        switch (yytok) {
            case AUTODECREMENT:
                return 39;
            case AUTOINCREMENT:
                return 40;
            case EQ:
                return 41;
            case EQQ:
                return 42;
            case GEQ:
                return 43;
            case GR:
                return 44;
            case LEQ:
                return 45;
            case LS:
                return 46;
            case MINUS:
                return 47;
            case CAPS:
            case SEMI:
                return yyr30();
        }
        return 157;
    }

    private int yys19() {
        switch (yytok) {
            case ENDINPUT:
            case VAR:
            case TT:
            case TRUE:
            case TILDE:
            case LBRACK:
            case SEMI:
            case NUM:
            case FF:
            case FALSE:
                return yyr5();
        }
        return 157;
    }

    private int yys21() {
        switch (yytok) {
            case ENDINPUT:
            case VAR:
            case TT:
            case TRUE:
            case TILDE:
            case LBRACK:
            case SEMI:
            case NUM:
            case FF:
            case FALSE:
                return yyr4();
        }
        return 157;
    }

    private int yys30() {
        switch (yytok) {
            case FALSE:
                return 9;
            case FF:
                return 10;
            case LBRACK:
                return 11;
            case NUM:
                return 12;
            case TILDE:
                return 13;
            case TRUE:
                return 14;
            case TT:
                return 15;
            case VAR:
                return 34;
        }
        return 157;
    }

    private int yys31() {
        switch (yytok) {
            case ENDINPUT:
            case VAR:
            case TT:
            case TRUE:
            case TILDE:
            case LBRACK:
            case SEMI:
            case NUM:
            case FF:
            case FALSE:
                return yyr3();
        }
        return 157;
    }

    private int yys32() {
        switch (yytok) {
            case DIVIDE:
                return 22;
            case EQQ:
                return 23;
            case LEQ:
                return 24;
            case LS:
                return 25;
            case MINUS:
                return 26;
            case MOD:
                return 27;
            case PLUS:
                return 28;
            case TIMES:
                return 29;
            case RBRACK:
                return 62;
        }
        return 157;
    }

    private int yys34() {
        switch (yytok) {
            case AUTODECREMENT:
                return 39;
            case AUTOINCREMENT:
                return 40;
            case EQQ:
                return 42;
            case GEQ:
                return 43;
            case GR:
                return 44;
            case LEQ:
                return 45;
            case LS:
                return 46;
            case MINUS:
                return 47;
            case CAPS:
            case SEMI:
            case RBRACK:
                return yyr30();
        }
        return 157;
    }

    private int yys37() {
        switch (yytok) {
            case AUTODECREMENT:
                return 39;
            case AUTOINCREMENT:
                return 40;
            case CAPS:
            case SEMI:
            case RBRACK:
            case COMMA:
                return yyr30();
        }
        return 157;
    }

    private int yys39() {
        switch (yytok) {
            case LS:
            case EQQ:
            case LEQ:
            case TIMES:
            case CAPS:
            case SEMI:
            case RBRACK:
            case DIVIDE:
            case PLUS:
            case MOD:
            case MINUS:
            case COMMA:
                return yyr42();
        }
        return 157;
    }

    private int yys40() {
        switch (yytok) {
            case LS:
            case EQQ:
            case LEQ:
            case TIMES:
            case CAPS:
            case SEMI:
            case RBRACK:
            case DIVIDE:
            case PLUS:
            case MOD:
            case MINUS:
            case COMMA:
                return yyr41();
        }
        return 157;
    }

    private int yys41() {
        switch (yytok) {
            case FF:
                return 10;
            case NUM:
                return 12;
            case TILDE:
                return 13;
            case TT:
                return 15;
            case VAR:
                return 37;
            case LBRACK:
                return 69;
        }
        return 157;
    }

    private int yys48() {
        switch (yytok) {
            case ENDINPUT:
            case VAR:
            case TT:
            case TRUE:
            case TILDE:
            case LBRACK:
            case SEMI:
            case NUM:
            case FF:
            case FALSE:
                return yyr2();
        }
        return 157;
    }

    private int yys49() {
        switch (yytok) {
            case ENDINPUT:
            case VAR:
            case TT:
            case TRUE:
            case TILDE:
            case LBRACK:
            case SEMI:
            case NUM:
            case FF:
            case FALSE:
                return yyr1();
        }
        return 157;
    }

    private int yys52() {
        switch (yytok) {
            case LS:
            case EQQ:
            case LEQ:
            case TIMES:
            case CAPS:
            case SEMI:
            case RBRACK:
            case DIVIDE:
            case PLUS:
            case MOD:
            case MINUS:
            case COMMA:
                return yyr38();
        }
        return 157;
    }

    private int yys54() {
        switch (yytok) {
            case DIVIDE:
                return 22;
            case MINUS:
                return 26;
            case MOD:
                return 27;
            case PLUS:
                return 28;
            case TIMES:
                return 29;
            case CAPS:
            case SEMI:
            case RBRACK:
            case COMMA:
                return yyr31();
        }
        return 157;
    }

    private int yys55() {
        switch (yytok) {
            case DIVIDE:
                return 22;
            case MINUS:
                return 26;
            case MOD:
                return 27;
            case PLUS:
                return 28;
            case TIMES:
                return 29;
            case CAPS:
            case SEMI:
            case RBRACK:
            case COMMA:
                return yyr32();
        }
        return 157;
    }

    private int yys56() {
        switch (yytok) {
            case DIVIDE:
                return 22;
            case MINUS:
                return 26;
            case MOD:
                return 27;
            case PLUS:
                return 28;
            case TIMES:
                return 29;
            case CAPS:
            case SEMI:
            case RBRACK:
            case COMMA:
                return yyr33();
        }
        return 157;
    }

    private int yys57() {
        switch (yytok) {
            case LS:
            case EQQ:
            case LEQ:
            case TIMES:
            case CAPS:
            case SEMI:
            case RBRACK:
            case DIVIDE:
            case PLUS:
            case MOD:
            case MINUS:
            case COMMA:
                return yyr37();
        }
        return 157;
    }

    private int yys58() {
        switch (yytok) {
            case LS:
            case EQQ:
            case LEQ:
            case TIMES:
            case CAPS:
            case SEMI:
            case RBRACK:
            case DIVIDE:
            case PLUS:
            case MOD:
            case MINUS:
            case COMMA:
                return yyr39();
        }
        return 157;
    }

    private int yys59() {
        switch (yytok) {
            case LS:
            case EQQ:
            case LEQ:
            case TIMES:
            case CAPS:
            case SEMI:
            case RBRACK:
            case DIVIDE:
            case PLUS:
            case MOD:
            case MINUS:
            case COMMA:
                return yyr35();
        }
        return 157;
    }

    private int yys60() {
        switch (yytok) {
            case LS:
            case EQQ:
            case LEQ:
            case TIMES:
            case CAPS:
            case SEMI:
            case RBRACK:
            case DIVIDE:
            case PLUS:
            case MOD:
            case MINUS:
            case COMMA:
                return yyr36();
        }
        return 157;
    }

    private int yys62() {
        switch (yytok) {
            case LS:
            case EQQ:
            case LEQ:
            case TIMES:
            case CAPS:
            case SEMI:
            case RBRACK:
            case DIVIDE:
            case PLUS:
            case MOD:
            case MINUS:
            case COMMA:
                return yyr40();
        }
        return 157;
    }

    private int yys64() {
        switch (yytok) {
            case DIVIDE:
                return 22;
            case MINUS:
                return 26;
            case MOD:
                return 27;
            case PLUS:
                return 28;
            case TIMES:
                return 29;
            case RBRACK:
                return 62;
        }
        return 157;
    }

    private int yys68() {
        switch (yytok) {
            case DIVIDE:
                return 22;
            case EQQ:
                return 23;
            case LEQ:
                return 24;
            case LS:
                return 25;
            case MINUS:
                return 26;
            case MOD:
                return 27;
            case PLUS:
                return 28;
            case TIMES:
                return 29;
            case SEMI:
            case COMMA:
                return yyr13();
        }
        return 157;
    }

    private int yys69() {
        switch (yytok) {
            case FF:
                return 10;
            case NUM:
                return 12;
            case TILDE:
                return 13;
            case TT:
                return 15;
            case VAR:
                return 37;
            case LBRACK:
                return 69;
        }
        return 157;
    }

    private int yys71() {
        switch (yytok) {
            case FF:
                return 10;
            case NUM:
                return 12;
            case TILDE:
                return 13;
            case TT:
                return 15;
            case VAR:
                return 37;
            case LBRACK:
                return 69;
        }
        return 157;
    }

    private int yyr1() { // EXPR_SEQUENCE : EXPR_SEQUENCE GUARD SEMI
        yysp -= 3;
        return 1;
    }

    private int yyr2() { // EXPR_SEQUENCE : EXPR_SEQUENCE ASSIGNMENT SEMI
        yysp -= 3;
        return 1;
    }

    private int yyr3() { // EXPR_SEQUENCE : GUARD SEMI
        yysp -= 2;
        return 1;
    }

    private int yyr4() { // EXPR_SEQUENCE : ASSIGNMENT SEMI
        yysp -= 2;
        return 1;
    }

    private int yyr5() { // EXPR_SEQUENCE : EXPR_SEQUENCE SEMI
        yysp -= 2;
        return 1;
    }

    private int yyr12() { // ASSIGN : VAR EQ BEXPRS
        { boolVars.add(((String)yysv[yysp-3])); }
        yysv[yysp-=3] = yyrv;
        return 2;
    }

    private int yyr13() { // ASSIGN : VAR EQ AEXPR
        { intVars.add(((String)yysv[yysp-3])); }
        yysv[yysp-=3] = yyrv;
        return 2;
    }

    private int yyr10() { // ASSIGNMENT : ASSIGN COMMA ASSIGNMENT
        yysp -= 3;
        return yypASSIGNMENT();
    }

    private int yyr11() { // ASSIGNMENT : ASSIGN
        yysp -= 1;
        return yypASSIGNMENT();
    }

    private int yypASSIGNMENT() {
        switch (yyst[yysp-1]) {
            case 1: return 17;
            case 0: return 3;
            default: return 50;
        }
    }

    private int yyr28() { // BEXPR : SHORTBOOL
        yysp -= 1;
        return yypBEXPR();
    }

    private int yyr29() { // BEXPR : TILDE BEXPR
        yysp -= 2;
        return yypBEXPR();
    }

    private int yyr30() { // BEXPR : VAR
        { boolVars.add(((String)yysv[yysp-1])); }
        yysv[yysp-=1] = yyrv;
        return yypBEXPR();
    }

    private int yyr31() { // BEXPR : AEXPR EQQ AEXPR
        yysp -= 3;
        return yypBEXPR();
    }

    private int yyr32() { // BEXPR : AEXPR LEQ AEXPR
        yysp -= 3;
        return yypBEXPR();
    }

    private int yyr33() { // BEXPR : AEXPR LS AEXPR
        yysp -= 3;
        return yypBEXPR();
    }

    private int yypBEXPR() {
        switch (yyst[yysp-1]) {
            case 71: return 66;
            case 69: return 66;
            case 41: return 66;
            case 13: return 35;
            default: return 4;
        }
    }

    private int yyr14() { // BEXPRS : BEXPRS CAPS BEXPRS
        yysp -= 3;
        return yypBEXPRS();
    }

    private int yyr15() { // BEXPRS : BEXPR
        yysp -= 1;
        return yypBEXPRS();
    }

    private int yyr16() { // BEXPRS : LBRACK BEXPRS RBRACK
        yysp -= 3;
        return yypBEXPRS();
    }

    private int yypBEXPRS() {
        switch (yyst[yysp-1]) {
            case 69: return 72;
            case 41: return 67;
            default: return 74;
        }
    }

    private int yyr19() { // CONSTRAINT : TRUE
        yysp -= 1;
        return 5;
    }

    private int yyr20() { // CONSTRAINT : FALSE
        yysp -= 1;
        return 5;
    }

    private int yyr21() { // CONSTRAINT : VAR SIM NUM
        { intVars.add(((String)yysv[yysp-3])); }
        yysv[yysp-=3] = yyrv;
        return 5;
    }

    private int yyr22() { // CONSTRAINT : VAR MINUS VAR SIM NUM
        { intVars.add(((String)yysv[yysp-5])); intVars.add(((String)yysv[yysp-3])); }
        yysv[yysp-=5] = yyrv;
        return 5;
    }

    private int yyr34() { // AEXPR : NUM
        yysp -= 1;
        return yypAEXPR();
    }

    private int yyr35() { // AEXPR : AEXPR PLUS AEXPR
        yysp -= 3;
        return yypAEXPR();
    }

    private int yyr36() { // AEXPR : AEXPR TIMES AEXPR
        yysp -= 3;
        return yypAEXPR();
    }

    private int yyr37() { // AEXPR : AEXPR MINUS AEXPR
        yysp -= 3;
        return yypAEXPR();
    }

    private int yyr38() { // AEXPR : AEXPR DIVIDE AEXPR
        yysp -= 3;
        return yypAEXPR();
    }

    private int yyr39() { // AEXPR : AEXPR MOD AEXPR
        yysp -= 3;
        return yypAEXPR();
    }

    private int yyr40() { // AEXPR : LBRACK AEXPR RBRACK
        yysp -= 3;
        return yypAEXPR();
    }

    private int yyr41() { // AEXPR : VAR AUTOINCREMENT
        { intVars.add(((String)yysv[yysp-2])); }
        yysv[yysp-=2] = yyrv;
        return yypAEXPR();
    }

    private int yyr42() { // AEXPR : VAR AUTODECREMENT
        yysp -= 2;
        return yypAEXPR();
    }

    private int yypAEXPR() {
        switch (yyst[yysp-1]) {
            case 69: return 32;
            case 41: return 68;
            case 36: return 64;
            case 29: return 60;
            case 28: return 59;
            case 27: return 58;
            case 26: return 57;
            case 25: return 56;
            case 24: return 55;
            case 23: return 54;
            case 22: return 52;
            case 11: return 32;
            default: return 6;
        }
    }

    private int yyr6() { // GUARD : CONSTRAINT
        yysp -= 1;
        return yypGUARD();
    }

    private int yyr7() { // GUARD : GUARD CAPS GUARD
        yysp -= 3;
        return yypGUARD();
    }

    private int yyr8() { // GUARD : BEXPR
        yysp -= 1;
        return yypGUARD();
    }

    private int yyr9() { // GUARD : LBRACK GUARD RBRACK
        yysp -= 3;
        return yypGUARD();
    }

    private int yypGUARD() {
        switch (yyst[yysp-1]) {
            case 11: return 33;
            case 1: return 18;
            case 0: return 7;
            default: return 61;
        }
    }

    private int yyr17() { // SHORTBOOL : TT
        {yyrv = new Boolean(true);}
        yysv[yysp-=1] = yyrv;
        return 8;
    }

    private int yyr18() { // SHORTBOOL : FF
        {yyrv = new Boolean(false);}
        yysv[yysp-=1] = yyrv;
        return 8;
    }

    private int yyr23() { // SIM : LS
        yysp -= 1;
        return yypSIM();
    }

    private int yyr24() { // SIM : LEQ
        yysp -= 1;
        return yypSIM();
    }

    private int yyr25() { // SIM : EQQ
        yysp -= 1;
        return yypSIM();
    }

    private int yyr26() { // SIM : GEQ
        yysp -= 1;
        return yypSIM();
    }

    private int yyr27() { // SIM : GR
        yysp -= 1;
        return yypSIM();
    }

    private int yypSIM() {
        switch (yyst[yysp-1]) {
            case 70: return 73;
            default: return 38;
        }
    }

    protected String[] yyerrmsgs = {
    };


/** Reference to the used lexical analyzer instance. */
        private ExpressionLexer lexer;

        /** Loaded with a string indicating the error position, if one occurs */
        private String errorString = "";
        
        private Set<String> boolVars = new HashSet<String>();
        private Set<String> intVars = new HashSet<String>();
        
        
        Set<String> getBoolVars() {
                return boolVars;
        }

        Set<String> getIntVars() {
                return intVars;
        }
                
        // METHOD SECTION. THEY OPERATE ON THE PARSER FIELDS AND ON THE PARSER
        // OUTPUT

        /**
         * Returns a string representing the error the parser encountered.
         * 
         * @return the <code>String</code> representing the error occurred
         */
        public String getError() {
                return errorString;
        }

        /**
         * Error function called from the parser for syntax error in the token
         * input. If an incorrect token (i.e. an unrecognizable token) is found from
         * the lexer or else when "error" token is returned in the semantics meaning
         * the tokens found are not acceptable in the particular context.
         */
        private void yyerror(String msg) {
                String err = "Error at line " + (lexer.linenr() + 1)
                                + " and at column " + (lexer.columnnr() + 1)
                                + " with character(s) \"" + lexer.yytext() + "\".\n";
                err = err + errorString;
                System.out.println(err);
        }

        /**
         * Called from the parser to get the next available token.
         * 
         * @return the <code>integer</code> value associated with the next token or
         *         the <code>error token</code> if an error occurs, or
         *         <code>endofinput token</code> if no more token are available
         */
        private int nextToken() {
                try {
                        return lexer.yylex();
                } catch (Exception e) {
                        return error;
                }
        }

        boolean checkExpressions(String inputFile) {
                try {
                        lexer = new ExpressionLexer(new StringReader(inputFile));
                        lexer.yylex();
                        if (!parse()) {
                                System.out.print("Parsing error - abort...");
                                System.out.print("Parser error status: "
                                                + (yyerrno > 0 ? yyerrmsgs[yyerrno] : "unknown"));
                                return false;
                        }
                } catch (Exception Ex) {
                        return false;
                }
                return true;
        }

}
